package EVO.before;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;

import java.util.Date;

@Aspect
public class MyAspect {
    //完整版@Before(value = "execution(public void EVO.before.SomeServiceImpl.doSome(String,Integer))")
    @Before(value = "execution(void doSome(..))")
    public void myBefore(JoinPoint jp){
        System.out.println("方法的完整定义："+jp.getSignature());
        System.out.println("方法的名称："+jp.getSignature().getName());
        Object[] args = jp.getArgs();
        for(Object obj : args){
            System.out.println("方法实参："+obj);
        }
        System.out.println("切面功能：在目标方法之前输出执行时间："+new Date());
    }
}
